package com.ruoyi.system.service.impl;

import java.util.List;

import cn.dev33.satoken.stp.StpUtil;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.ShopCompanyInfo;
import com.ruoyi.system.domain.ShopSoftware;
import com.ruoyi.system.domain.ShopUser;
import com.ruoyi.system.mapper.ShopCompanyInfoMapper;
import com.ruoyi.system.mapper.ShopUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShopSceneMapper;
import com.ruoyi.system.domain.ShopScene;
import com.ruoyi.system.service.IShopSceneService;

/**
 * 应用场景信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-03
 */
@Service
public class ShopSceneServiceImpl implements IShopSceneService 
{
    @Autowired
    private ShopSceneMapper shopSceneMapper;
    @Autowired
    private ShopUserMapper shopUserMapper;
    @Autowired
    private ShopCompanyInfoMapper shopCompanyInfoMapper;
    /**
     * 查询应用场景信息
     * 
     * @param sceneId 应用场景信息主键
     * @return 应用场景信息
     */
    @Override
    public ShopScene selectShopSceneBySceneId(Long sceneId)
    {
        return shopSceneMapper.selectShopSceneBySceneId(sceneId);
    }

    /**
     * 查询应用场景信息列表
     * 
     * @param shopScene 应用场景信息
     * @return 应用场景信息
     */
    @Override
    public List<ShopScene> selectShopSceneList(ShopScene shopScene)
    {
        List<ShopScene> shopSceneList = shopSceneMapper.selectShopSceneList(shopScene);
        return shopSceneList;
    }

    /**
     * 新增应用场景信息
     * 
     * @param shopScene 应用场景信息
     * @return 结果
     */
    @Override
    public int insertShopScene(ShopScene shopScene)
    {
        shopScene.setCreateTime(DateUtils.getNowDate());
        return shopSceneMapper.insertShopScene(shopScene);
    }

    /**
     * 修改应用场景信息
     * 
     * @param shopScene 应用场景信息
     * @return 结果
     */
    @Override
    public int updateShopScene(ShopScene shopScene)
    {
        shopScene.setUpdateTime(DateUtils.getNowDate());
        return shopSceneMapper.updateShopScene(shopScene);
    }

    /**
     * 批量删除应用场景信息
     * 
     * @param sceneIds 需要删除的应用场景信息主键
     * @return 结果
     */
    @Override
    public int deleteShopSceneBySceneIds(Long[] sceneIds)
    {
        return shopSceneMapper.deleteShopSceneBySceneIds(sceneIds);
    }

    /**
     * 删除应用场景信息信息
     * 
     * @param sceneId 应用场景信息主键
     * @return 结果
     */
    @Override
    public int deleteShopSceneBySceneId(Long sceneId)
    {
        return shopSceneMapper.deleteShopSceneBySceneId(sceneId);
    }


    @Override
    public ShopScene getShopSceneTotal()
    {
        return shopSceneMapper.getShopSceneTotal();
    }

    @Override
    public ShopScene selectShopSceneBySceneIdTwo(Long sceneId) {
        return shopSceneMapper.selectShopSceneBySceneIdTwo(sceneId);
    }

    @Override
    public List<ShopScene> selectShopSceneListByUserId(ShopScene shopScene) {
        return shopSceneMapper.selectShopSceneListByUserId(shopScene);
    }

    @Override
    public List<ShopScene> selectShopSceneList1(ShopScene shopScene) {
        return shopSceneMapper.selectShopSceneList(shopScene);
    }

}
